import { getChannelListAPI } from '@/apis/channels'
import { useEffect, useState } from 'react'
import type { ChannelItem } from '@/apis/channels'
 export const useTabs = () => {
  const [channelList,setChannelList] = useState<ChannelItem[]>([])
  useEffect(() => {
    const getChannelList = async() => {
      const res = await getChannelListAPI()
      setChannelList(res.data.data.channels)
    }
    getChannelList()
  },[])
  return {
    channelList
  }
}